<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.example.Brand" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>品牌展示</title>
    <link rel="stylesheet" href="css/styles.css">
    <script src="js/scripts.js"></script>
</head>
<body>
    <header>
        <h1>品牌展示页面</h1>
    </header>

    <section>
        <h2>品牌列表</h2>
        <div class="brand-list">
            <%
                // 模拟从数据库或服务层获取品牌数据
                List<Brand> brands = new ArrayList<>();
                brands.add(new Brand(1, "小米Su7 Ultra", "images/brand1.jpg", "小米汽车推出的首款高性能智能电动汽车..."));
                brands.add(new Brand(2, "原生鸿蒙", "images/brand2.jpg", "原生鸿蒙（HarmonyOS）是华为自主研发的分布式操作系统..."));
                brands.add(new Brand(3, "广东东软学院", "images/brand3.jpg", "广东东软学院是经国家教育部批准设立的全日制普通本科高等院校,华南地区IT人才培养的重要基地..."));

                for (Brand brand : brands) {
            %>
            <div class="brand-item">
                <img src="<%= brand.getImageUrl() %>" alt="<%= brand.getName() %>">
                <h3><%= brand.getName() %></h3>
                <p><%= brand.getDescription() %></p>
            </div>
            <%
                }
            %>
        </div>
    </section>

    <footer>
        <p>&copy; 2025 品牌展示页面</p>
    </footer>
</body>
</html>